# -*- coding: utf-8 -*-
<%inherit file="/admin.mako"/>
<p style="text-align: center"><span class="destak">Candidatos</span></p>
${h.form(h.url(action='',id=None),method='post')}
<div id="list" class="inner_context">
  <table class="tablelist" width="100%" cellpadding="0" cellmargin="0">    
    <tbody class="ligth_gray">
      <tr>
        <td align="right" width="15%"><strong>Candidato</strong></td>
        <td width="*">${h.text_field('q',class_='ed',size='50',value=c.q or '')}</td>
      </tr>
    </tbody>
  </table>
<br/>
${h.submit(value=' Pesquisar ',class_='ed')}
</div>
${h.end_form()}
<br/>
<div id="list" class="inner_context">
<span class="destak">[</span><a href="${h.url_for(action='edit',id=None)}">Adicionar</a><span class="destak">]</span>
  <table class="tablelist" width="100%" cellpadding="0" cellmargin="0">    
    <thead>
      <tr>
        <th width="10%" align="left">C&oacute;digo</th>
        <th width="80%" align="left">Candidato</th>
        <th width="10%">&nbsp;</th>
      </tr>
    </thead>
    <tbody class="ligth_gray">
%if c.list:
    %for candidato in c.list:
        <tr>
          <td><a href="${h.url_for(action='edit',id=candidato.cdcandidato)}">${candidato.idcandidato}</a></td>
          <td>${candidato.nmcandidato}</td>
          <td><span class="destak">[</span><a href="${h.url_for(action='delete',id=candidato.cdcandidato)}">X</a><span class="destak">]</span></td>
        </tr>
    %endfor
%endif
    </tbody>
  </table>
</div>
